<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>周末看新闻--网罗一周热门资讯</title>
    <link rel="shortcut icon" href="__ROOT__/Public/images/favicon.ico">
    <link rel="stylesheet" href="__ROOT__/Public/css/bootstrap.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/css/app.css">
    <script src="__ROOT__/Public/js/jquery-2.0.0.min.js"></script>
    <script src="__ROOT__/Public/js/bootstrap.min.js"></script>
    
<link rel="stylesheet" href="__ROOT__/Public/css/bootstrap-datetimepicker.min.css">

<link rel="stylesheet" href="__ROOT__/Public/editor/themes/default/default.css" />
<link rel="stylesheet" href="__ROOT__/Public/editor/plugins/code/prettify.css" />
<script charset="utf-8" src="__ROOT__/Public/editor/kindeditor.js"></script>
<script charset="utf-8" src="__ROOT__/Public/editor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__ROOT__/Public/editor/plugins/code/prettify.js"></script>
<script>
		KindEditor.ready(function(K) {
			var editor1 = K.create('textarea[name="content"]', {
				cssPath : '__ROOT__/Public/editor/plugins/code/prettify.css',
				uploadJson : '__ROOT__/Public/editor/php/upload_json.php',
				fileManagerJson : '__ROOT__/Public/editor/php/file_manager_json.php',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						K('form[name=example]')[0].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
    <style type="text/css">
    .img{
     margin:10% 0 0 17%; 
     width:70%; 
     height:auto;
    }
    .acontent{
    margin-top: 30px;
    border-top: 1px solid #ebebeb;
    padding: 21px 0 0 21px;
	font-size:1.5em;
    }
    </style>
</head>
<body class="home-template">
    <header class="main-header">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <a class="branding" href="__ROOT__/index.php" title="周末看新闻--网罗一周热门资讯">
                        <img src="__ROOT__/Public/images/logo.png">
                    </a>
                </div>
            </div>
        </div>
    </header>
    <nav class="main-navigation">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="navbar-header">
                        <span class="nav-toggle-button collapse" data-target="#main-menu">
                            <span class="sr-only"></span>
                            <i class="fa fa-bars"></i>
                        </span>
                    </div>
                    <div class="collapse navbar-collapse" id="main-menu">
                        <ul class="menu">
                            <li role="presentation">
                                <a href="__ROOT__/index.php">首页</a>
                            </li>
                            <li role="presentation">
                                <a href="#">浏览新闻</a>
                            </li>
                            <li class="nav-current" role="presentation">
                                <a href="#">添加新闻</a>
                            </li>
                            <li role="presentation">
                                <a href="#">关于我们</a>
                            </li>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </nav>
    <section class="content-wrap">
        <div class="container">
            <div class="row">
                <main class="col-md-8 main-content" >
                <!-- 添加新闻表单 -->
                    <form  name="addform" method="POST" action="__URL__/insert" enctype="multipart/form-data"  class="post addform">
                       新闻标题：<input type="text" name="title" id="title"><br>
	        新闻内容：<textarea name="content" rows="6" cols="96"></textarea> <br>
	       新闻图片：<input type="file" name="pic"/><br>
	      新闻发布者：<input type="text" name="eauthor" id="eauthor"><br><br><!-- 
<input type="text" name="etime" id="etime" value=""><br> -->
<div style="float:left;" class="input-group date form_datetime col-md-5" data-date="2015-12-03T10:10:00Z" data-date-format="yyyy-mm-dd HH:ii:ss" data-link-field="dtp_input1">
 发布时间：                                <input class="form-control" name="etime" id="etime"size="16" type="text" value="" readonly>
                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
				<span class="input-group-addon"><span  class="glyphicon glyphicon-calendar"></span></span>
</div>
<input type="hidden" id="dtp_input1" value="" /><br/>
<br/><br/><input type="submit" class="btn btn-default" value="添加新闻">
</form>
<!-- 编辑新闻表单 -->    
<form name="editform" method="post" action="__URL__/update" enctype="multipart/form-data" class="post editform">
                       新闻标题：<input type="text" name="title" id="title"  value="{$vo.title}"><br>
	        新闻内容：<textarea name="content" rows="6" cols="96">{$vo.content}</textarea> <br>
	       新闻图片：<input type="file" name="pic" value="{$vo.pic}"/><br>
	      新闻发布者：<input type="text" name="eauthor" id="eauthor" value="{$vo.eauthor}"><br><br><!-- 
<input type="text" name="etime" id="etime" value=""><br> -->
<div style="float:left;" class="input-group date form_datetime col-md-5" data-date="2015-12-03T10:10:00Z" data-date-format="yyyy-mm-dd HH:ii:ss" data-link-field="dtp_input1">
 发布时间：                                <input class="form-control" name="etime" id="etime"size="16" type="text" value="" readonly>
                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
				<span class="input-group-addon"><span  class="glyphicon glyphicon-calendar"></span></span>
</div>
<input type="hidden" name="id" value="{$vo.id}">
<input type="hidden" id="dtp_input1" value="" /><br/>
<br/><br/><input type="submit" class="btn btn-default" value="修改新闻">
</form>   
<script>
if("{$vo.id}"==""){
	$(".editform").remove();
}else{
	$(".addform").remove();
}
$('input[type=submit]').click(function(){
    if($('#title').val()==''){
        alert('请填写新闻标题');
        return false;
    }else{
        if($('#eauthor').val()==''){
            alert('请填写新闻发布人');
            return false;
        }
    }
});
</script>
                </main>
                <aside class="col-md-4 sidebar">
                    <div class="widget">
                        <h4 class="title">意见反馈</h4>
                        <div class="content community">
                            <p>QQ群：1234567890</p>
                            <p>
                                <a href="#">官方论坛</a>
                            </p>
                            <p>
                                <a href="#">官方微博</a>
                            </p>
                        </div>
                    </div>
                    <div class="widget">
                        <h4 class="title">标签云</h4>
                        <div class="content tag-cloud">
                            <a href="#">周末看新闻</a>
                            <a href="#">新闻热点</a>
                            <a href="#">推荐新闻</a>
                            <a href="#">图片</a>
                            <a href="#">自定义界面</a>
                        </div>
                    </div>
                </aside>
            </div>
        </div>
    </section>
    <footer class="main-footer">
        <div class="container">
            <div class="row">
                <div class="col-md-4">
                    <div class="widget">
                        <h4 class="title">最热新闻</h4>
                        <div class="content recent-post">
                            <div class="recent-single-post">
                                <a href="#" class="post-title">第一条新闻的标题</a>
                                <div class="date">2015-12-24</div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="widget">
                        <h4 class="title">标签云</h4>
                        <div class="content tag-cloud">
                            <a href="#">周末看新闻</a>
                            <a href="#">新闻热点</a>
                            <a href="#">推荐新闻</a>
                            <a href="#">图片</a>
                            <a href="#">自定义界面</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="widget">
                        <h4 class="title">合作伙伴</h4>
                        <div class="content tag-cloud">
                            <a href="#">新浪网</a>
                            <a href="#">搜狐网</a>
                            <a href="#">百度网</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </footer>
     <script type="text/javascript" src="__ROOT__/Public/js/bootstrap-datetimepicker.js" charset="UTF-8"></script>
   <script type="text/javascript" src="__ROOT__/Public/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <script> 
   
   $('.form_datetime').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
	autoclose: 1,
	todayHighlight: 1,
	startView: 2,
	forceParse: 0,
    showMeridian: 1
})
</script>
</body>
</html>




















